package me.ereach.casting;

public final class Student extends Person {
    private String className;
    private int enterYear;

    public Student(String name, String gender, String className, int enterYear) {
        super(name, gender);
        this.className = className;
        this.enterYear = enterYear;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public int getEnterYear() {
        return enterYear;
    }

    public void setEnterYear(int enterYear) {
        this.enterYear = enterYear;
    }

    @Override
    public String toString() {
        return "Student { " + super.toString() + ", className: " + className + ", enterYear: " + enterYear + " }";
    }
}
